package com.ultrawise.survey.contants;

import java.util.HashMap;
import java.util.Map;

public class SurveyConstants {

	/** 登录后用户信息在Session中的Key 后台用户登录名 这个对象内容仅仅为String字符串信息，请妥善使用 **/
	public static final String BACK_LOGIN_LAWUSER = "BACK_LOGIN_LAWUSER";
	/** Session对象中放的是SessionUserInfo对象内容，请妥善使用 ***/
	public static final String BACK_SESSION_LAWUSER_INFO = "BACK_SESSION_LAWUSER_INFO";
	// 退出地址
	public static final String LOGOUT_ADDRESS = "LOGOUT_ADDRESS";
	// 登录地址
	public static final String SURVEY_TEMPLATE_PATH = "/survey/template/";
	public static final String SURVEY_OUTFILE_PATH = "/front/publish/";
	public static final String SURVEY_TEMPLATEFILE_SUFFIX = ".jsp";
	// 流程类型常量 0创建1修改2删除
	public static final String LOGBUSINESS_TYPE_CREATE = "0";
	public static final String LOGBUSINESS_TYPE_UPDATE = "1";
	public static final String LOGBUSINESS_TYPE_DELETE = "2";

	public static final String AdministratorUser_Type = "0";// 管理员
	public static final String User_Type = "1";// 普通用户
	public static final String USER_TYPE_SUPERVISER = "3";// 监察管理用户

	public static final int USER_STATUS_ISSTOP = 0;// 用户停用

	public static final String Resource_Type_App = "0";
	public static final String Resource_Type_Menu = "1";
	public static final String Resource_Type_Funtion = "2";// 资源为功能

	public static final String LOGINED_USER = "USER_LOGINED_INFO";// 用户登录信息对象信息
	public static final String LOGIN_SESSION_LOGINNAME = "LOGIN_SESSION_LOGINNAME";// 用户登陆后的session名称信息

	public static final String Artifact = "Artifact"; // 登录凭证

	public static final String ONLY_AUTHORIZED = "ONLY_AUTHORIZED";// 仅授权的
	public static final String AUTHORIZED_NOT_SAFEGUARD = "AUTHORIZED_NOT_SAFEGUARD"; // 授权的和未被保护的

	public static final String USER_INFO = "userInfo"; // 用户信息
	public static final String CAN_ACCESS = "canAccess"; // 可访问
	public static final String NOT_ACCESS = "notAccess"; // 不可访问
	public static final String MENU_INFO = "menuInfo"; // 可访问栏目

	public static final String TREE_VIEWPAGE = "common/menutree";
	public static final String TREE_ASYN_VIEWPAGE = "common/asyntree";

	public static final String APP_NAME = "/survey";

	public static final String APP_ICON_PATH = "cdmanage/images/public/";

	public static final Integer SURVEY_ISPUB_TRUE = 1;// 已经发布的调查问卷
	public static final Integer SURVEY_ISPUB_FALSE = 0;// 未发布的调查问卷
	
	public static final Integer SURVEY_BASE_STATUS_NOTSTAR = 0;// 未开始的调查问卷
	public static final Integer SURVEY_BASE_STATUS_STAR = 1;// 正在开始的调查问卷
	public static final Integer SURVEY_BASE_STATUS_END = 2;// 已经结束的调查问卷
	public static final Integer SURVEY_BASE_STATUS_STOP = 3;// 暂停的调查问卷
	public static final Integer SURVEY_BASE_STATUS_CLOSE = 4;// 关闭的调查问卷
	
	//public static final String SURVEY_APPNAME="surveypro";//应用的名称
	public static final String SURVEY_DATAINFO_SPACE="\\|";
	
	public static final Map SURVEY_TEMPLATE =new HashMap();
	static{
		SURVEY_TEMPLATE.put("ONE","tp1.ftl");
		SURVEY_TEMPLATE.put("TWO","tp2.ftl");
	}
	
	
	
	public static final Map<String,String> OBJECT_TYPEMAP = new HashMap<String,String>();
	static{
		OBJECT_TYPEMAP.put("1","字符串");
		OBJECT_TYPEMAP.put("2","数字");
		OBJECT_TYPEMAP.put("3","时间类型");
		OBJECT_TYPEMAP.put("4","大文本");
		OBJECT_TYPEMAP.put("5","身份证");
		OBJECT_TYPEMAP.put("6","上传图形");
		OBJECT_TYPEMAP.put("7","参数选择");
	}
	
	public static final Map<String,String> OBJECT_COLNUM_MYSQLDB = new HashMap<String,String>();
	static{
		OBJECT_COLNUM_MYSQLDB.put("1","varchar");//字符串
		OBJECT_COLNUM_MYSQLDB.put("2","int");//数字
		OBJECT_COLNUM_MYSQLDB.put("3","varchar");//时间类型 默认长度23
		OBJECT_COLNUM_MYSQLDB.put("4","text");//大文本
		OBJECT_COLNUM_MYSQLDB.put("5","varchar");//身份证    默认长度为18
		OBJECT_COLNUM_MYSQLDB.put("6","varchar");//上传图形   默认长度为100
		OBJECT_COLNUM_MYSQLDB.put("7","varchar");//参数选择 
	}
	
	public static final Map<String,String> OBJECT_COLNUM_LENGTH_MYSQLDB = new HashMap<String,String>();
	static{
		OBJECT_COLNUM_LENGTH_MYSQLDB.put("3","23");//时间类型 默认长度23
		OBJECT_COLNUM_LENGTH_MYSQLDB.put("5","18");//身份证    默认长度为18
		OBJECT_COLNUM_LENGTH_MYSQLDB.put("6","100");//上传图形   默认长度为100
	}

}
